﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ThanhTu.GNCMedia.KQXS.DataAccess.DAL;
using ThanhTu.GNCMedia.KQXS.DataAccess.DO;
using System.Data;

namespace ThanhTu.GNCMedia.KQXS.DataAccess.BL
{
    public class TimeofAwardsBL : IDisposable
    {
        private TimeofAwardsDAL vTimeofAwardsDAL = null;
        private bool disposed = false;
        public TimeofAwardsBL()
        {
            if (vTimeofAwardsDAL == null)
            {
                vTimeofAwardsDAL = new TimeofAwardsDAL();
            }
        }
        ~TimeofAwardsBL() { Dispose(false); }

        #region IDisposable Members

        public void Dispose()
        {
            Dispose(true);
            GC.SuppressFinalize(this);
        }

        private void Dispose(bool disposing)
        {
            if (!disposed)
            {
                if (disposing)
                {
                    if (vTimeofAwardsDAL != null)
                    {
                        vTimeofAwardsDAL.Dispose();
                        vTimeofAwardsDAL = null;
                    }
                }

                disposed = true;
            }
        }

        #endregion

        public int SaveTimeAward(TimeofAwardsDO vTimeofAwardsDO) { return vTimeofAwardsDAL.SaveTimeAward(vTimeofAwardsDO); }
        public int delete(TimeofAwardsDO vTimeofAwardsDO) { return vTimeofAwardsDAL.delete(vTimeofAwardsDO); }
        public List<TimeofAwardsDO> SelectALL_QT() { return vTimeofAwardsDAL.SelectALL_QT(); }
        public List<TimeofAwardsDO> SelectALL_Date_QT(string vDate_Wards) { return vTimeofAwardsDAL.SelectALL_Date_QT(vDate_Wards); }
        public DataTable SelectAll_TimeAward_user(int pageIndex, int pageSize, ref int rowCount) { return vTimeofAwardsDAL.SelectAll_TimeAward_user( pageIndex,  pageSize, ref  rowCount); }
    }
}
